@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');
@import 'normalize.css';

*,
*:after,
*:before {
	box-sizing: border-box;
}

:root {
	--x: 0;
	--y: 0;
}

html {
	color-scheme: light only;
}

body {
	display: flex;
	place-items: center;
	justify-content: center;
	min-height: 100svh;
	touch-action: none;
	font-family: 'SF Pro Text', 'SF Pro Icons', 'AOS Icons', 'Helvetica Neue',
		Helvetica, Arial, sans-serif, system-ui;
	margin: 0;
	padding: 0.5rem;
}

body::before {
	--line: color-mix(in lch, canvasText 25%, transparent);
	--size: 60px;
	content: '';
	height: 100vh;
	width: 100vw;
	position: fixed;
	background: linear-gradient(
				90deg,
				var(--line) 1px,
				transparent 1px var(--size)
			)
			0 -5vmin / var(--size) var(--size),
		linear-gradient(var(--line) 1px, transparent 1px var(--size)) 0 -5vmin / var(
				--size
			) var(--size);
	mask: linear-gradient(-15deg, transparent 60%, white);
	top: 0;
	z-index: -1;
}

article {
	width: 600px;
	aspect-ratio: 2 / 1.1;
	max-height: calc(100svh - 2rem);
/*	max-height: 100px;*/
	position: relative;
	overflow: hidden;
/*	border-radius: 4em;*/
/*	clip-path: inset(0 0 0 0 round 4em);*/
	max-width: calc(100% - 2rem);
}

@media(orientation: portrait) {
	article {
		min-height: 330px;
	}
}

.assets > img {
	position: absolute;
	top: 0;
	left: 50%;
	translate: -50% 0;
	height: 100%;
	width: 660px;
	object-fit: cover;
	object-position: center 43%;
	user-select: none;
	pointer-events: none;
}

.assets > img:first-of-type {
	filter: saturate(1.5) brightness(0.9);
	object-position: calc(-50% + (var(--x) * 30px)) calc(43% + (var(--y) * -20px));
}

.assets > img:last-of-type {
	object-position: calc(-50% + (var(--x) * 40px)) calc(43% + (var(--y) * -40px));
}

.assets h3 {
	position: absolute;
	left: 50%;
	top: 6%;
	margin: 0;
	font-size: 8rem;
	translate: -50% 0;
	text-transform: uppercase;
	font-family: 'Bebas Neue', sans-serif;
	color: white;
	translate: calc(-50% + (var(--x) * -30px)) calc(var(--y) * -20px);
}

.content {
	min-height: 32%;
	position: absolute;
	bottom: 0;
	width: 100%;
	color: white;
	display: grid;
	gap: 0.2rem;
	place-items: center;
	align-content: center;
	padding-bottom: 0.5rem;
	z-index: 2;
}

.content svg {
	width: 20px;
}

.content p {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 1.2rem;
	position: relative;
}

.content p:first-of-type::after {
	content: '';
	position: absolute;
	bottom: calc(100% + 1rem);
	left: 50%;
	width: 6ch;
	background: white;
	height: 1px;
	translate: -50% 0;
}

.content p:last-of-type {
	opacity: 0.8;
}

/* Blurring */
.blur {
	--layers: 5;
	position: absolute;
	inset: 0;
}

.blur .layer {
	--blur: calc(
		sin(((var(--layers) - var(--index)) / var(--layers)) * 90deg) * 30
	);
	--stop: calc(
		sin(((var(--index)) / var(--layers)) * 90deg) * 15
	);
	position: absolute;
	inset: 0;
	background: hsl(0 0% 60% / 0.05);
	backdrop-filter: blur(calc(var(--blur) * 1px));
	mask: radial-gradient(
		150% 130% at 45% 90%,
		#fff 15%,
		#0000 calc((15 + var(--stop)) * 1%)
	);
}

.assets {
	position: absolute;
	inset: 0;
	border-radius: 4em;
	overflow: hidden;
}

.bear-link {
	color: canvasText;
	position: fixed;
	top: 1rem;
	left: 1rem;
	width: 48px;
	aspect-ratio: 1;
	display: grid;
	place-items: center;
	opacity: 0.8;
}

:where(.x-link, .bear-link):is(:hover, :focus-visible) {
	opacity: 1;
}
.bear-link svg {
	width: 75%;
}
